array to comma separated string php

38

$arr = array ( 0 => "lorem", 1 => "ipsum", 2 => "dolor");

$str = implode (", ", $arr);
$myString = "9,[email protected],8";
$myArray = explode(',', $myString);
print_r($myArray);
 $tags = implode(', ', array('tag1','tag2','tag3','tag4'));
$string = implode(', ', $tags);

Comments

Submit
0 Comments